#include "dataconfig.h"
#include <QDebug>


//1——墙 2——陷阱 3——箱子 4——人物 5——箱子和陷阱重合
DataConfig::DataConfig(QObject *parent) : QObject(parent)
{
    //第一关地图数据
    int array1[16][16] = {
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,1,2,1,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,1,0,1,1,1,1,0,0,0,0},
        {0,0,0,0,1,1,1,3,0,3,2,1,0,0,0,0},
        {0,0,0,0,1,2,0,3,4,1,1,1,0,0,0,0},
        {0,0,0,0,1,1,1,1,3,1,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,1,2,1,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} };
    QVector< QVector<int>> v;
    for(int i = 0 ; i < 16 ; i++)
    {
        QVector<int> v1;
        for(int j = 0 ; j < 16 ; j++)
        {
            v1.push_back(array1[i][j]);
        }
        v.push_back(v1);
    }
    mData.insert(1, v);

    //第二关地图数据
    int array2[16][16] = {
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0},
        {0,0,0,0,1,4,0,0,1,0,0,0,0,0,0,0},
        {0,0,0,0,1,0,3,3,1,0,1,1,1,0,0,0},
        {0,0,0,0,1,0,3,0,1,0,1,2,1,0,0,0},
        {0,0,0,0,1,1,1,0,1,1,1,2,1,0,0,0},
        {0,0,0,0,0,1,1,0,0,0,0,2,1,0,0,0},
        {0,0,0,0,0,1,0,0,0,1,0,0,1,0,0,0},
        {0,0,0,0,0,1,0,0,0,1,1,1,1,0,0,0},
        {0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} };
    v.clear();
    for(int i = 0 ; i < 16 ; i++)
    {
        QVector<int> v1;
        for(int j = 0 ; j < 16 ; j++)
        {
            v1.push_back(array2[i][j]);
        }
        v.push_back(v1);
    }
    mData.insert(2, v);

    //第三关地图数据
    int array3[16][16] = {
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0},
        {0,0,0,0,1,0,0,0,0,0,1,1,1,0,0,0},
        {0,0,0,1,1,3,1,1,1,0,0,0,1,0,0,0},
        {0,0,0,1,0,4,0,3,0,0,3,0,1,0,0,0},
        {0,0,0,1,0,2,2,1,0,3,0,1,1,0,0,0},
        {0,0,0,1,1,2,2,1,0,0,0,1,0,0,0,0},
        {0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} };
    v.clear();
    for(int i = 0 ; i < 16 ; i++)
    {
        QVector<int> v1;
        for(int j = 0 ; j < 16 ; j++)
        {
            v1.push_back(array3[i][j]);
        }
        v.push_back(v1);
    }
    mData.insert(3, v);

    //第4关地图数据
    int array4[16][16] = {
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0},
    {0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0},
    {0,0,0,0,1,4,3,0,1,0,0,0,0,0,0,0},
    {0,0,0,0,1,1,3,0,1,1,0,0,0,0,0,0},
    {0,0,0,0,1,1,0,3,0,1,0,0,0,0,0,0},
    {0,0,0,0,1,2,3,0,0,1,0,0,0,0,0,0},
    {0,0,0,0,1,2,2,5,2,1,0,0,0,0,0,0},
    {0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} };
    v.clear();
    for(int i = 0 ; i < 16 ; i++)
    {
        QVector<int> v1;
        for(int j = 0 ; j < 16 ; j++)
        {
            v1.push_back(array4[i][j]);
        }
        v.push_back(v1);
    }
    mData.insert(4, v);

    //第5关地图数据
    int array5[16][16] = {
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0},
        {0,0,0,0,0,1,4,0,1,1,1,0,0,0,0,0},
        {0,0,0,0,0,1,0,3,0,0,1,0,0,0,0,0},
        {0,0,0,0,1,1,1,0,1,0,1,1,0,0,0,0},
        {0,0,0,0,1,2,1,0,1,0,0,1,0,0,0,0},
        {0,0,0,0,1,2,3,0,0,1,0,1,0,0,0,0},
        {0,0,0,0,1,2,0,0,0,3,0,1,0,0,0,0},
        {0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} };
    v.clear();
    for(int i = 0 ; i < 16 ; i++)
    {
        QVector<int> v1;
        for(int j = 0 ; j < 16 ; j++)
        {
            v1.push_back(array5[i][j]);
        }
        v.push_back(v1);
    }
    mData.insert(5, v);

    //第6关地图数据
    int array6[16][16] = {
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0},
        {0,1,1,1,1,0,0,0,0,0,1,0,0,0,0,0},
        {0,1,0,0,0,2,1,1,1,0,1,0,0,0,0,0},
        {0,1,0,1,0,1,0,0,0,0,1,1,0,0,0,0},
        {0,1,0,1,0,3,0,3,1,2,0,1,0,0,0,0},
        {0,1,0,1,0,0,5,0,0,1,0,1,0,0,0,0},
        {0,1,0,2,1,3,0,3,0,1,0,1,0,0,0,0},
        {0,1,1,0,0,0,0,1,0,1,0,1,1,1,0,0},
        {0,0,1,0,1,1,1,2,0,0,0,0,4,1,0,0},
        {0,0,1,0,0,0,0,0,1,1,0,0,0,1,0,0},
        {0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}};
    v.clear();
    for(int i = 0 ; i < 16 ; i++)
    {
        QVector<int> v1;
        for(int j = 0 ; j < 16 ; j++)
        {
            v1.push_back(array6[i][j]);
        }
        v.push_back(v1);
    }
    mData.insert(6, v);

    //第7关地图数据
    int array7[16][16] = {
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0},
        {0,0,0,0,0,1,1,0,0,1,0,4,1,0,0,0},
        {0,0,0,0,0,1,0,0,0,1,0,0,1,0,0,0},
        {0,0,0,0,0,1,3,0,3,0,3,0,1,0,0,0},
        {0,0,0,0,0,1,0,3,1,1,0,0,1,0,0,0},
        {0,0,0,1,1,1,0,3,0,1,0,1,1,0,0,0},
        {0,0,0,1,2,2,2,2,2,0,0,1,0,0,0,0},
        {0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}};
    v.clear();
    for(int i = 0 ; i < 16 ; i++)
    {
        QVector<int> v1;
        for(int j = 0 ; j < 16 ; j++)
        {
            v1.push_back(array7[i][j]);
        }
        v.push_back(v1);
    }
    mData.insert(7, v);

    //第8关地图数据
    int array8[16][16] = {
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0},
        {0,0,0,0,1,1,1,0,0,0,0,1,0,0,0,0},
        {0,0,0,1,1,2,0,3,1,1,0,1,1,0,0,0},
        {0,0,0,1,2,2,3,0,3,0,0,4,1,0,0,0},
        {0,0,0,1,2,2,0,3,0,3,0,1,1,0,0,0},
        {0,0,0,1,1,1,1,1,1,0,0,1,0,0,0,0},
        {0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}};
    v.clear();
    for(int i = 0 ; i < 16 ; i++)
    {
        QVector<int> v1;
        for(int j = 0 ; j < 16 ; j++)
        {
            v1.push_back(array8[i][j]);
        }
        v.push_back(v1);
    }
    mData.insert(8, v);